//
//  LLCommitOrderAddressCell.m
//  LoveLove
//
//  Created by 肖兰月 on 2019/4/10.
//  Copyright © 2019 wkf. All rights reserved.
//

#import "LLCommitOrderAddressCell.h"

@interface LLCommitOrderAddressCell ()
@property (strong, nonatomic) LLButton *addBtn;
@end

@implementation LLCommitOrderAddressCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initSubViews];
    }
    return self;
}

- (void)initSubViews {
    _addBtn = [LLInitBaseViewTool buttonWithTitle:@"请填写收货地址" image:@"addAddress" titleColor:LLColorRGB(75) font:15];
    _addBtn.imageEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 20);
    [_addBtn addTarget:self action:@selector(addBtnClick) forControlEvents:UIControlEventTouchUpInside];
    [self.contentView addSubview:_addBtn];
}

- (void)addBtnClick {
    if ([self.delegate respondsToSelector:@selector(cellDidClickAdd:)]) {
        [self.delegate cellDidClickAdd:self];
    }
}

- (void)layoutSubviews {
    [super layoutSubviews];
    _addBtn.frame = CGRectMake(20, (self.height-30)/2.0, 160, 30);
}

@end
